﻿using System;

namespace CSharpExt.CObject
{
    // ----------------------------------------------------------------------

    [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
    public class ParamAttribute : Attribute
    {
        #region Constructor

        public ParamAttribute()
        {
            
        }

        #endregion

        #region Properties

        public bool Mandatory { get; set; }
        public String Alias   { get; set; }

        #endregion
    }

    [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
    public class OParamAttribute : ParamAttribute
    {
        #region Constructor

        public OParamAttribute()
        {
            Mandatory = false;
        }

        #endregion
    }

    [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
    public class MParamAttribute : ParamAttribute
    {
        #region Constructor

        public MParamAttribute()
        {
            Mandatory = true;
        }

        #endregion
    }

    // ----------------------------------------------------------------------

    public class NameAttribute : Attribute
    {
        #region Properties

        public String Name { get; set; }

        #endregion
    }

    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
    public class TypeNameAttribute : NameAttribute
    {
        #region Constructor

        public TypeNameAttribute()
        {
 
        }

        #endregion
    }

    // ======================================================================

    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
    public class DiagnosticAttribute : Attribute
    {
        #region Private Data

        private bool _flatten;
        private bool _skip;

        #endregion

        #region Constructor

        public DiagnosticAttribute()
        {
            _flatten = false;
        }

        #endregion

        #region Properties

        public bool Flatten
        {
            get { return _flatten; }
            set { _flatten = value; }
        }

        public bool Skip
        {
            get { return _skip; }
            set { _skip = value; }
        }

        #endregion
    }
}
